package com.stray.crawl.model;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class TaskResult<T> {

	private long id;
	private TaskGroup group;
	private TaskResult<?> parentTask;
	private List<String> childrenTasks;

	// Business Logic Product
	private List<T> results;
	private Date date;
	private long downloadTime;
	private long parseTime;

	// Raw Input / Output
	private String url;
	private String content;
	private Map<String, String> params;
	private Map<String, String> requestHeaders;
	private Map<String, String> responseHeaders;

	// TODO Hash & Equals base on url and params
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public TaskGroup getGroup() {
		return group;
	}

	public void setGroup(TaskGroup group) {
		this.group = group;
	}

	public TaskResult<?> getParentTask() {
		return parentTask;
	}

	public void setParentTask(TaskResult<?> parentTask) {
		this.parentTask = parentTask;
	}

	public List<String> getChildrenTasks() {
		return childrenTasks;
	}

	public void setChildrenTasks(List<String> childrenTasks) {
		this.childrenTasks = childrenTasks;
	}

	public List<T> getResults() {
		return results;
	}

	public void setResults(List<T> results) {
		this.results = results;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public long getDownloadTime() {
		return downloadTime;
	}

	public void setDownloadTime(long downloadTime) {
		this.downloadTime = downloadTime;
	}

	public long getParseTime() {
		return parseTime;
	}

	public void setParseTime(long parseTime) {
		this.parseTime = parseTime;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Map<String, String> getParams() {
		return params;
	}

	public void setParams(Map<String, String> params) {
		this.params = params;
	}

	public Map<String, String> getRequestHeaders() {
		return requestHeaders;
	}

	public void setRequestHeaders(Map<String, String> requestHeaders) {
		this.requestHeaders = requestHeaders;
	}

	public Map<String, String> getResponseHeaders() {
		return responseHeaders;
	}

	public void setResponseHeaders(Map<String, String> responseHeaders) {
		this.responseHeaders = responseHeaders;
	}

}